Make use of config.h files optional to allow third party build tools.
authorrobertl <robertl>
Wed, 20 Jan 2010 20:22:11 +0000 (20:22 +0000)
committerrobertl <robertl>
Wed, 20 Jan 2010 20:22:11 +0000 (20:22 +0000)
Makefile.in
cet_util.h
defs.h
exif.c
gbfile.h
gbsleep.c
jeeps/gpslibusb.c
jeeps/gpsusbstub.c

index 71ec94a6f4c0dd8dbe5525e51785132b7a94a037..75e0631d23fa47cfd9c48be91b011cf349ae21e0 100644 (file)
@@ -35,7 +35,7 @@ OUTPUT_SWITCH=-o #
 #DEBUGGING=-g $(EXTRA_DEBUGGING)
 # add -DDEBUG_MEM to turn on memory allocation logging
 GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I. -I$(srcdir) \
-       $(OPTIMIZATION) @CFLAGS@
+       $(OPTIMIZATION) -DHAVE_CONFIG_H @CFLAGS@
 LDFLAGS=$(EXTRA_LDFLAGS) @LDFLAGS@
 PREFIX=@prefix@
 INSTALL_DIR=$(DESTDIR)/$(PREFIX)
index 38941815732de3201fa7a62642aa73e54a7a13ce..1fc12062f5bbffebef1286548dd72959b0010109 100644 (file)
@@ -24,7 +24,9 @@
 
 #include <ctype.h>
 #include <stdio.h>
+#if HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #if HAVE_LIBEXPAT
 # include <expat.h>
diff --git a/defs.h b/defs.h
index 0c15fa127998ed93966b0b92463e858481c2b1a6..24d39ce495fb7663bcf6f65b53784fbf8ef06f1a 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -25,7 +25,9 @@
 #include <string.h>
 #include <stdarg.h>
 #include <stddef.h>
+#if HAVE_CONFIG_H
 #include "config.h"
+#endif
 #include "queue.h"
 #include "gbtypes.h"
 #if HAVE_LIBZ
diff --git a/exif.c b/exif.c
index 105a92498231146f5b7500bc43dea32c0c594690..23b29497e9578e2ba43309636954f2eaf7cc362d 100644 (file)
--- a/exif.c
+++ b/exif.c
@@ -26,7 +26,6 @@
 #include <string.h>
 
 #include "defs.h"
-#include "config.h"
 #include "garmin_tables.h"
 #include "jeeps/gpsmath.h"
 #include "strptime.h"
index 639aa7bd4b6527966a34db0a26a5991dfe5e740d..432c44e6e0808f559110f17f14e2a72aa5099e8a 100644 (file)
--- a/gbfile.h
+++ b/gbfile.h
@@ -26,7 +26,6 @@
 #include <ctype.h>
 #include <stdarg.h>
 #include <string.h>
-#include "config.h"
 #include "defs.h"
 #include "cet.h"
 
index a4b9ed6be53c60d923c059ce4bf08017190ae147..63f1fa0ba64fbb47042cade4675736cd446fb197 100644 (file)
--- a/gbsleep.c
+++ b/gbsleep.c
@@ -18,7 +18,9 @@
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 
  */
+#if HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #if __WIN32__
 
index 71710737dc1f01fe5d5f865853d775aed4eeab04..579b731ce03f43b0d4f07e3eadcde5ff0875945f 100644 (file)
@@ -22,7 +22,9 @@
 
 #include <stdio.h>
 #include <ctype.h>
+#if HAVE_CONFIG_H
 #include "config.h"
+#endif
 #if HAVE_LIBUSB
 #include <usb.h>
 #include "gps.h"
index 060bab4222c86b174ed21d37d916443e4820c7c6..0838c1b5afa36240d7c46d240cf03109aa773f8e 100644 (file)
  */
 
 
+#if HAVE_CONFIG_H
 #include "config.h"
+#endif
+
 #include "../defs.h"
+
 #if !HAVE_LIBUSB 
 
 const char no_usb[] = "USB support is not available in this build.\n";